{extend name="common@base" /}
{block name="content"}
<section class="content">
  <div class="row">
    <div class="col-xs-12">
      <div class="box box-primary">
        <div class="box-header with-border">
          <div class="box-title">考试管理</div>
          <div class="pull-right">
            <a href="{:url('add')}" class="btn btn-primary js-confirm">创建自测试卷</a>
          </div>
        </div>
        <div class="box-body">
          <table id="table" class="table">
            <thead>
            <tr>
              <th>考卷ID</th>
              <th>考卷配置</th>
              <th>考试时间</th>
              <th>通过分数</th>
              <th>状态</th>
              <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {foreach $rows as $row}
            <tr>
              <td>{$row.id}</td>
              <td>{$row.q_configText}</td>
              <td>{$row.exam_duration}</td>
              <td>{$row.pass_score}</td>
              <td><span class="{$row.status==1? 'text-danger' : 'text-success'}">{$row.statusText}</span></td>
              <td><a href="{:url('disable',['id'=>$row.id])}"
                     class="btn btn-xs js-confirm {$row.status==0? 'btn-danger' : 'btn-success'}">
                {$row.status==0? '禁用' : '启用'}</a></td>
            </tr>
            {/foreach}
            </tbody>
          </table>
        </div>
        <div class="box-footer">
          {$rows->render()}
        </div>
      </div>
    </div>
  </div>
</section>
{/block}
{block name="page_script"}
<script>
  require(["layer_config", "ajaxForm"], function (layer) {
  });
</script>
{/block}





